package com.company.myfirstjmixproject.entity.bom;

import io.jmix.core.entity.annotation.JmixGeneratedValue;
import io.jmix.core.metamodel.annotation.JmixEntity;
import liquibase.pro.packaged.F;
import org.checkerframework.checker.units.qual.C;

import javax.persistence.*;

@JmixEntity
@Table(name = "BOM_ROUTING_REFS")
@Entity
public class BomRoutingRefs {
    @JmixGeneratedValue
    @Column(name = "ID", nullable = false)
    @Id
    private Long id;

    @Column(name = "VERSION", nullable = false)
    @Version
    private Integer version;

    @JoinColumn(name = "ROUTING_ID",nullable = false)
    @OneToOne(fetch = FetchType.LAZY)
    private Routing routing;

    @JoinColumn(name = "BOM_ID",nullable = false)
    @OneToOne(fetch = FetchType.LAZY)
    private BomHeader bomHeader;

    @Column(name = "LEAD_TIME",length = 11)
    private Integer leadTime;

    @Column(name = "LEAD_TIME_UOM",length = 20)
    private String leadTimeUom;



    public Integer getVersion() {
        return version;
    }

    public void setVersion(Integer version) {
        this.version = version;
    }

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }
}